# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-other
pkgname=kuserfeedback
pkgver=1.3.0
pkgrel=0
pkgdesc="Framework for collecting user feedback for applications via telemetry and surveys"
url="https://kde.org/products/frameworks/"
arch="all !armhf"
license="MIT"
depends_dev="
	qt5-qtbase-dev
	qt5-qtdeclarative-dev
	qt5-qtsvg-dev
	qt5-qttools-dev
	"
makedepends="$depends_dev
	extra-cmake-modules
	samurai
	"
checkdepends="xvfb-run"
subpackages="$pkgname-dev $pkgname-lang"
_repo_url="https://invent.kde.org/libraries/kuserfeedback.git"
source="https://download.kde.org/stable/kuserfeedback/kuserfeedback-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	# openglinfosourcetest requires OpenGL
	xvfb-run ctest --test-dir build --output-on-failure -E "openglinfosourcetest"
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
16fc7fa850e7ac1dc772ab25f81f75fe28454680ce9ddf68da0f14c6d5e9b8201f69d168b1ee32bdf9f0ee517b0cac34eb09fd3dbfa697c0a8d3b23c6ac790cb  kuserfeedback-1.3.0.tar.xz
"
